package net.gz01.wallet.common;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 银行大的分类
 * @author zhangyu
 */
public class TopBank {
	
	private static Map<String, TopBank> cache = new HashMap<>();
	public static final List<TopBank> topBankList = new ArrayList<>();
	
	static {
		// 已取得英文缩写的银行
		topBankList.add(new TopBank("ABC", "农业银行", "103100000026", "中国农业银行"));
		topBankList.add(new TopBank("BOC","中国银行","104100000004","中国银行"));
		topBankList.add(new TopBank("BOCOM","交通银行","301290000007","交通银行"));
		topBankList.add(new TopBank("BOG","广州银行","313581003284","广州银行股份有限公司"));
		topBankList.add(new TopBank("CCB","建设银行","105100000017","中国建设银行"));
		topBankList.add(new TopBank("CEB","光大银行","303100000006","中国光大银行"));
		topBankList.add(new TopBank("CGB","广发银行","306581000003","广发银行股份有限公司"));
		topBankList.add(new TopBank("CIB","兴业银行","309391000011","兴业银行"));
		topBankList.add(new TopBank("CITIC","中信银行","302100011000","中信银行"));
		topBankList.add(new TopBank("CMB","招商银行","308584000013","招商银行"));
		topBankList.add(new TopBank("CMBC","民生银行","305100000013","中国民生银行"));
		topBankList.add(new TopBank("DGB","东莞银行","313602088017","东莞银行股份有限公司"));
		topBankList.add(new TopBank("EBCL","恒丰银行","315456000105","恒丰银行"));
		topBankList.add(new TopBank("GHB","华兴银行","313586000006","广东华兴银行股份有限公司"));
		topBankList.add(new TopBank("HXB","华夏银行","304100040000","华夏银行股份有限公司"));
		topBankList.add(new TopBank("ICBC","工商银行","102100099996","中国工商银行"));
		topBankList.add(new TopBank("PAB","平安银行","307584007998","平安银行"));
		topBankList.add(new TopBank("PSBC","邮政银行","403100000004","中国邮政储蓄银行"));
		topBankList.add(new TopBank("SPDB","浦东银行","310290000013","上海浦东发展银行"));
		topBankList.add(new TopBank("BOB","北京银行","313100001104","北京银行股份有限公司"));
		topBankList.add(new TopBank("BOSC","上海银行","313290000017","上海银行股份有限公司"));
		
		topBankList.forEach(item -> cache.put(item.shortEnName, item));
	}

	public static TopBank getByShortEnName(String shortEnName) {
		return cache.get(shortEnName);
	}
	
	public TopBank() {}
	
	public TopBank(String shortEnName, String shortCnName, String bankNo, String bankName) {
		this.shortEnName = shortEnName;
		this.shortCnName= shortCnName;
		this.bankNo = bankNo;
		this.bankName = bankName;
	}
	
	// 英文简称缩写
	private String shortEnName;
	// 中文速记简称
	private String shortCnName;
	// 银行行号
	private String bankNo;
	// 银行名称
	private String bankName;
	
	public String getShortEnName() {
		return shortEnName;
	}
	public void setShortEnName(String shortEnName) {
		this.shortEnName = shortEnName;
	}
	public String getShortCnName() {
		return shortCnName;
	}
	public void setShortCnName(String shortCnName) {
		this.shortCnName = shortCnName;
	}
	public String getBankNo() {
		return bankNo;
	}
	public void setBankNo(String bankNo) {
		this.bankNo = bankNo;
	}
	public String getBankName() {
		return bankName;
	}
	public void setBankName(String bankName) {
		this.bankName = bankName;
	}
	
}
